package com.bobamrz.domain;

// Generated 01.06.2013 15:30:51 by Hibernate Tools 4.0.0

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * DocumentDocType generated by hbm2java
 */
@Entity
@Table(name = "document_doc_type", schema = "public")
public class DocumentDocType implements java.io.Serializable {

	private long documentDocType;
	private Document document;
	private DocType docType;

	public DocumentDocType() {
	}

	public DocumentDocType(long documentDocType) {
		this.documentDocType = documentDocType;
	}

	public DocumentDocType(long documentDocType, Document document,
			DocType docType) {
		this.documentDocType = documentDocType;
		this.document = document;
		this.docType = docType;
	}

	@Id
	@SequenceGenerator(name = "seqGenerator3", sequenceName = "document_doc_type_id")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqGenerator3")
	@Column(name = "document_doc_type", unique = true, nullable = false, precision = 10, scale = 0)
	public long getDocumentDocType() {
		return this.documentDocType;
	}

	public void setDocumentDocType(long documentDocType) {
		this.documentDocType = documentDocType;
	}

	@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
	@JoinColumn(name = "document_fk")
	public Document getDocument() {
		return this.document;
	}

	public void setDocument(Document document) {
		this.document = document;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "doc_type_fk")
	public DocType getDocType() {
		return this.docType;
	}

	public void setDocType(DocType docType) {
		this.docType = docType;
	}

}
